﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NewstorePlateformeDAO;

namespace NewstorePlateformeMobileApp.Controllers
{
    public class AccueilController : Controller
    {
        //
        // GET: /Accueil/

        public ActionResult Index()
        {
            GOLD_EMPLOYE currentUser = new GOLD_EMPLOYE() { Nom = "Inconnu", Prenom = "Inconnu" };

            try
            {
                int? utilisId = (int?) SessionHelper.GetSession(SessionHelper.sessionVariables.iUTILIS_ID);

                if (utilisId != null)
                    currentUser = GOLD_EMPLOYE.Get((int)Utilisateur.Get((int)utilisId).idGOLD_EMPLOYE);
            }
            catch
            {

            }
            
            return View(currentUser);
        }

    }
}
